package cn.itsource.api.openfeign;

import cn.itsource.constants.Constants;
import cn.itsource.fallback.RuleFallback;
import cn.itsource.pojo.dto.ExpectPriceDto;
import cn.itsource.pojo.ro.RuleRo;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(value = Constants.Remote.SERVICE_RULE,fallbackFactory = RuleFallback.class)
public interface IRuleApiToService {
    //算预计价格
    @PostMapping(Constants.Remote.PREFIX_RULE_REMOTE)
    JSONResult<ExpectPriceDto> saveRule(@RequestBody @Valid RuleRo ruleRo);
}
